package com.framework.modules.base.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.framework.common.utils.PageUtils;
import com.framework.common.utils.Query;

import com.framework.modules.base.dao.UserGiftHistoryDao;
import com.framework.modules.base.entity.UserGiftHistoryEntity;
import com.framework.modules.base.service.UserGiftHistoryService;


@Service("userGiftHistoryService")
public class UserGiftHistoryServiceImpl extends ServiceImpl<UserGiftHistoryDao, UserGiftHistoryEntity> implements UserGiftHistoryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        EntityWrapper wrapper=new EntityWrapper<UserGiftHistoryEntity>();
        if(params.containsKey("uid")){
            wrapper.eq("uid",params.get("uid"));
        }
        Page<UserGiftHistoryEntity> page = this.selectPage(
                new Query<UserGiftHistoryEntity>(params).getPage(),
                wrapper
        );

        return new PageUtils(page);
    }

}
